package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * EdDocAutorizado generated by hbm2java
 */
@Entity
@Table(name = "ED_DOC_AUTORIZADO", schema = "EDADEPUDOC")
public class EdDocAutorizado implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5853642838415332887L;
	private EdDocAutorizadoId id;
	private EdSolicitudCorr edSolicitudCorr;
	private ImTipoDocum imTipoDocum;
	private String nresolucion;
	private Date fhresolucion;

	public EdDocAutorizado() {
	}

	public EdDocAutorizado(EdDocAutorizadoId id,
			EdSolicitudCorr edSolicitudCorr, ImTipoDocum imTipoDocum,
			Date fhresolucion) {
		this.id = id;
		this.edSolicitudCorr = edSolicitudCorr;
		this.imTipoDocum = imTipoDocum;
		this.fhresolucion = fhresolucion;
	}

	public EdDocAutorizado(EdDocAutorizadoId id,
			EdSolicitudCorr edSolicitudCorr, ImTipoDocum imTipoDocum,
			String nresolucion, Date fhresolucion) {
		this.id = id;
		this.edSolicitudCorr = edSolicitudCorr;
		this.imTipoDocum = imTipoDocum;
		this.nresolucion = nresolucion;
		this.fhresolucion = fhresolucion;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "iindice", column = @Column(name = "I_INDICE", nullable = false, precision = 18, scale = 0)),
			@AttributeOverride(name = "ctipoDocumento", column = @Column(name = "C_TIPO_DOCUMENTO", nullable = false, length = 3)) })
	public EdDocAutorizadoId getId() {
		return this.id;
	}

	public void setId(EdDocAutorizadoId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "I_INDICE", nullable = false, insertable = false, updatable = false)
	public EdSolicitudCorr getEdSolicitudCorr() {
		return this.edSolicitudCorr;
	}

	public void setEdSolicitudCorr(EdSolicitudCorr edSolicitudCorr) {
		this.edSolicitudCorr = edSolicitudCorr;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_TIPO_DOCUMENTO", nullable = false, insertable = false, updatable = false)
	public ImTipoDocum getImTipoDocum() {
		return this.imTipoDocum;
	}

	public void setImTipoDocum(ImTipoDocum imTipoDocum) {
		this.imTipoDocum = imTipoDocum;
	}

	@Column(name = "N_RESOLUCION", length = 30)
	public String getNresolucion() {
		return this.nresolucion;
	}

	public void setNresolucion(String nresolucion) {
		this.nresolucion = nresolucion;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_RESOLUCION", nullable = false, length = 7)
	public Date getFhresolucion() {
		return this.fhresolucion;
	}

	public void setFhresolucion(Date fhresolucion) {
		this.fhresolucion = fhresolucion;
	}

}
